package com.hzncc.flowable_diboot.trial_contracts.service;

import com.diboot.core.service.BaseService;
import com.diboot.core.vo.JsonResult;
import com.diboot.core.vo.Pagination;
import com.hzncc.flowable_diboot.trial_contracts.dto.TrialContractAuditDTO;
import com.hzncc.flowable_diboot.trial_contracts.entity.TrialContract;
import com.hzncc.flowable_diboot.trial_contracts.vo.TrialContractAuditDetailVO;
import com.hzncc.flowable_diboot.trial_contracts.vo.TrialContractAuditListVO;

import java.util.List;

/**
 * 试用合同 相关Service接口定义
 *
 * @author MyName
 * @version 1.0
 * @date 2024-10-15
 * Copyright © MyCorp
 */
public interface TrialContractService extends BaseService<TrialContract> {

    /**
     * 保存合同
     * @param trialContract
     * @param isSubmit
     * @return
     */
    String saveTrialContract(TrialContractAuditDetailVO trialContract, Boolean isSubmit);

    /**
     * 合同变更
     * @param trialContract
     * @param isSubmit
     * @return
     */
    String updateTrialContract(TrialContractAuditDetailVO trialContract, Boolean isSubmit);

    /**
     * 合同取消
     * @param trialContract
     * @param isSubmit
     * @return
     */
    String cancelTrialContract(TrialContractAuditDetailVO trialContract, Boolean isSubmit);

    /**
     * 合同转正
     * @param id
     * @return
     */
    String contractConfirmation(String id);

    /**
     * 获取已保存的合同变更
     * @param id
     * @return
     */
    TrialContractAuditDetailVO getUpdateSavedContract(String id);

    /**
     * 获取合同变更历史
     * @param queryDto
     * @param pagination
     * @return
     */
    List<TrialContractAuditListVO> getContractHistory(TrialContractAuditDTO queryDto, Pagination pagination);

    List<TrialContractAuditListVO> selectContractList(TrialContractAuditDTO queryDto,Pagination pagination,String type, String permission);

    JsonResult<String> deleteContract(List<String> ids);
}